﻿/*******************************************************************************
 * AAEngine
 * Copyright (c) 2010 Mike Jarosch
 *
 * Original source PushButton Engine:
 * Copyright (C) 2009 PushButton Labs, LLC
 * For more information see http://www.pushbuttonengine.com
 *
 * This file is licensed under the terms of the MIT license, which is included
 * in the "MIT License.txt" file at the root directory of this SDK.
 ******************************************************************************/

namespace AAEngine.Engine.Core
{
    /// <summary>
    /// This interface should be implemented by objects that need to perform
    /// actions every frame. This is most often things directly related to
    /// rendering, such as advancing frames of a sprite animation. For performing
    /// physics, processing AI, or other things of that nature, responding to
    /// ticks would be more appropriate.
    /// </summary>
    /// <seealso cref="ProcessManager"/>
    /// <seealso cref="ITickedObject"/>
    public interface IAnimatedObject
    {
        /// <summary>
        /// This method is called every frame by the ProcessManager on any objects
        /// that have been added to it with the AddAnimatedObject method
        /// </summary>
        /// <param name="deltaTime">
        /// The amount of time (in seconds) that has elapsed since
        /// the last frame.
        /// </param>
        /// <seealso cref="ProcessManager.AddAnimatedObject(IAnimatedObject)"/>
        /// <seealso cref="ProcessManager.AddAnimatedObject(IAnimatedObject, float)"/>
        void OnFrame(float deltaTime);
    }
}
